﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PhilipService.Entity;

namespace PhilipSupport.Controls.MainControl
{
    public partial class MyInfo : UserControl
    {
        public MyInfo(GetMyInfoResponse res)
        {
            InitializeComponent();
            label_account.Text = res.Name;
            label_name.Text = res.HostId;
            label_ownid.Text = res.OwnId;
            label_desc.Text = res.Infomation;
        }

        private void MyInfo_Paint(object sender, PaintEventArgs e)
        {
            
        }

        private void MyInfo_SizeChanged(object sender, EventArgs e)
        {
            this.Refresh();
        }

        private void panel_Paint(object sender, PaintEventArgs e)
        {
            var pen = new Pen(Color.LightGray);
            e.Graphics.DrawLine(pen, new Point(0, 0), new Point(panel.Width, 0));
            e.Graphics.DrawLine(pen, new Point(panel.Width - 1, 0), new Point(panel.Width - 1, panel.Height - 1));
            e.Graphics.DrawLine(pen, new Point(0, panel.Height - 1), new Point(panel.Width - 1, panel.Height - 1));
            e.Graphics.DrawLine(pen, new Point(0, panel.Height - 1), new Point(0, 0));
        }
    }
}
